package cn.tx.stringbuilder;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/10/16 22:35
 */
public class Demo1 {
    public static void main(String[] args) {
        //创建一个空白可变字符串对象，不含有任何内容
        //调用空参构造方法
        StringBuilder sb = new StringBuilder();
        System.out.println("sb: "+sb);
        System.out.println("sb.length(): "+sb.length());

        //根据字符串的内容，来创建可变字符串对象
        StringBuilder sb2 = new StringBuilder("hello");
        System.out.println("sb2: "+sb2);
        System.out.println("sb2.length(): "+sb2.length());
    }
}
